package com.javaxiaobang.service;


import com.javaxiaobang.fallback.FeginFallback;
import feign.Body;
import feign.Headers;
import feign.Param;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 声明CLIENTAPP的接口
 */
@Component
//@Headers("Accept:appliaction/json") //当前接口下，所有的feign请求都会被设置这个头
@FeignClient(name = "CLIENTAPP", fallback = FeginFallback.class)
//@FeignClient(name = "CLIENTAPP")
public interface FeginService {

    //    @Headers("Content-Type:appliaction/json")
    @GetMapping("")
    String index();

    @GetMapping(value = "/getDictList")
    Object getDictList();

    @GetMapping(value = "/getDictMap")
    Object getDictMap();

    @GetMapping(value = "/javaxiaobang/getDictList")
    Object getDictFeiginList();

    @GetMapping(value = "/javaxiaobang/getDictMap")
    Object getDictFeiginMap();


//    @Headers("Token:{token}")//设置动态值
//    @RequestMapping("")
//    String getToken(@Param("token") String token);
//
//    @Body("%7B\"orderNo\": \"{orderNo}\"%7D")
//    @RequestMapping(value = "/getOrderNo", method = RequestMethod.POST)
//    String getOrderNo(@Param("orderNo") String orderNo);


}
